<template>
	<div id="app">
		<router-view></router-view>
	</div>
</template>

<script>
  import { api } from '~/ui-domain'
  export default{
    name: 'APP',
    async mounted() {
      const { data } = await this.$http.get(`${process.env.API_BASE || api.base}/site-show`)
      document.title = data.site_name
      if (this.isO2O) {
        let script = document.createElement('script')
        script.src = 'https://webapi.amap.com/maps?v=1.4.15&key=a4553619077791eb0a6df2f450b9a03b&plugin=AMap.CircleEditor,AMap.PolyEditor,AMap.ToolBar,AMap.Geolocation,AMap.Geocoder,AMap.Autocomplete,AMap.Scale'
        document.getElementsByTagName('head')[0].appendChild(script)
      }
    }
  }
</script>
